﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Commonlib;
using System.Data;
namespace AlbonWeb.Manager.SizeManager
{
    public partial class SizeTemplete : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //绑定 style item
                string cmdstr = "select * from Style where parentID=0 and active=1";
                SqlHelper.BindDropDownList(ddlItem, "styleName", "ID", SqlHelper.SqlConnectionString, CommandType.Text, cmdstr, null);
                //绑定size item
                bindRep();
            }
        }
        protected void bindRep()
        {
            string cmdstr = "select * from SizeTempleteView where styleID="+ddlItem.SelectedValue;
            SqlHelper.BindRepeater(repMain, SqlHelper.SqlConnectionString, CommandType.Text, cmdstr, null);
        }

        protected void ddlItem_SelectedIndexChanged(object sender, EventArgs e)
        {
            bindRep();
        }
    }
}